//
//  MD2Entity.h
//  CompGraf2
//
//  Created by Juan Niosi on 06/09/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Entity.h"
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>

#import "Engine.h"
#import "MD2AnimFrame.h"
#import "MD2Anim.h"
#import "Bounds.h"

@interface MD2Model : NSObject
{
    NSString *modelName;
    
    NSDictionary *anims;
    
    Bounds *bounds;
    
    GLfloat *uvs;
    
    NSMutableArray *textures;
    
    GLint vertCount;
    
    int textureIndex;
    
}
@property (nonatomic, retain) NSString *modelName;
@property (nonatomic, retain) Bounds *bounds;

- (id)init:(NSString *)filename;
- (BOOL)draw:(Engine *)engine withAnim:(NSString *)animName atTime:(float)time looping:(BOOL)loop;
- (void)addTexture:(Texture *)tex;
- (MD2AnimFrame *)getInterpolatedFrame:(MD2Anim *)anim:(float)idx;
- (BOOL)hasAnim:(NSString*)animName;
@end
